import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      component: resolve => require(["../pages/Login.vue"], resolve)
    },
    {
      path: "/register",
      component: resolve => require(["../pages/RegisterPage.vue"], resolve)
    },

    {
      path: "/Home",
      component: resolve => require(["../components/Home.vue"], resolve),
      children: [
        {
          path: "/Info",
          component: resolve => require(["../pages/InfoPage.vue"], resolve)
        },
        {
          path: "/Cadre",
          component: resolve => require(["../pages/CadrePage.vue"], resolve)
        },
        {
          path: "/Towns",
          component: resolve => require(["../pages/TownsPage.vue"], resolve)
        },
        {
          path: "/WorkLog",
          component: resolve => require(["../pages/WorkLogPage.vue"], resolve)
        },
        {
          path: "/VillagersMessage",
          component: resolve =>
            require(["../pages/VillagersMessagePage.vue"], resolve)
        },
        {
          path: "/AskForLeave",
          component: resolve =>
            require(["../pages/AskForLeavePage.vue"], resolve)
        },
        {
          path: "/Visit",
          component: resolve => require(["../pages/VisitPage.vue"], resolve)
        },
        {
          path: "/Organization",
          component: resolve =>
            require(["../pages/OrganizationPage.vue"], resolve)
        },
        {
          path: "/Village",
          component: resolve => require(["../pages/VillagePage.vue"], resolve)
        },
        {
          path: "/Member",
          component: resolve => require(["../pages/MemberPage.vue"], resolve)
        },
        {
          path: "/PopulationFlow",
          component: resolve => require(["../pages/PopulationFlowPage.vue"], resolve)
        }
      ]
    }
  ]
});
